import { createApp } from 'vue';
import App from './App.vue';
import router from '@/router/index'; //引入路由
import '@/styles/reset.scss'; //引入清除默认样式
import '@/styles/common.scss'; //引入全局样式
import 'virtual:uno.css';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
// svg图标
import 'virtual:svg-icons-register';
import SvgIcon from '@/components/SvgIcon/index.vue';
import elementIcons from '@/components/SvgIcon/svgicon';
import 'default-passive-events'
import MapPickPoint from '@/components/MapPickPoint/index.js';

import { createPinia } from 'pinia';
const pinia = createPinia();
import { createPersistedState } from 'pinia-plugin-persistedstate';
pinia.use(
  createPersistedState({
    auto: true, // 启用所有 Store 默认持久化
  }),
);

const app = createApp(App);
app.use(pinia);
app.use(ElementPlus);
app.use(elementIcons);
app.component('SvgIcon', SvgIcon);
app.component('MapPickPoint', MapPickPoint);
app.use(router);

app.mount('#app');
